@use "@pythnetwork/component-library/theme";

.publishersCard {
  .publisherScore {
    width: calc(theme.spacing(1) * var(--width));
    height: theme.spacing(4);
    border-radius: theme.border-radius("3xl");
    position: relative;

    .fill {
      position: absolute;
      top: 0;
      bottom: 0;
      left: 0;
      border-radius: theme.border-radius("3xl");
      color: theme.color("background", "primary");
      display: grid;
      place-content: center;
      text-shadow:
        0 1px 2px rgb(0 0 0 / 10%),
        0 1px 3px rgb(0 0 0 / 10%);
      font-size: theme.font-size("xxs");
      font-weight: theme.font-weight("semibold");
    }

    &[data-size-class="bad"] {
      background: theme.color("states", "error", "background");

      .fill {
        background: theme.color("states", "error", "color");
      }
    }

    &[data-size-class="weak"] {
      background: theme.color("states", "warning", "background");

      .fill {
        background: theme.color("states", "warning", "normal");
      }
    }

    &[data-size-class="warn"] {
      background: theme.color("states", "yellow", "background");

      .fill {
        background: theme.color("states", "yellow", "normal");
      }
    }

    &[data-size-class="ok"] {
      background: theme.color("states", "lime", "background");

      .fill {
        background: theme.color("states", "lime", "normal");
      }
    }

    &[data-size-class="good"] {
      background: theme.color("states", "success", "background");

      .fill {
        background: theme.color("states", "success", "normal");
      }
    }
  }
}
